package app.remote.service;

import app.remote.entity.RssUrl;
import app.remote.repository.RssRepository;
import com.sun.syndication.feed.rss.Channel;
import com.sun.syndication.feed.synd.SyndFeed;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: haibo.wang
 * Date: 13-7-9
 * Time: 下午3:39
 * To change this template use File | Settings | File Templates.
 */
@Service
public class RssService {
    @Resource
    private RssRepository rssRepository;

    public List<RssUrl> getHello() {
        return rssRepository.getHello();
    }

    public void addUrl(RssUrl rssUrl) {
        rssRepository.addUrl(rssUrl);
    }

    public Channel getRssInfo(int id) {
        return rssRepository.getRssInfo(id);
    }

    public void deleteUrl(int id) {
        rssRepository.deleteUrl(id);
    }
}
